﻿using Asp.Versioning;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;

namespace Himp.TaskScheduling.V1
{
    /// <summary>
    /// 
    /// </summary>
    [Area(TaskSchedulingRemoteServiceConsts.ModuleName)]
    [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)]
    [Route("api/taskScheduling/paramConfigTask")]
    [ApiVersion("1.0")]
    [ApiController]
    [ControllerName("paramConfigTask")]
    public class ParamConfigTaskController : TaskSchedulingController, IParamConfigTaskService
    {
        private IParamConfigTaskService _paramConfigTaskService;

        /// <summary>
        /// 
        /// </summary>
        /// <param name="paramConfigService"></param>
        public ParamConfigTaskController(IParamConfigTaskService paramConfigTaskService)
        {
            _paramConfigTaskService = paramConfigTaskService;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        [HttpGet]
        public Task<PagedResultDto<ParamConfigTaskDto>> GetListAsync([FromQuery]ParamConfigTaskInput input)
        {
            return _paramConfigTaskService.GetListAsync(input);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost]
        public Task<ParamConfigTaskDto> PostAsync([FromBody]ParamConfigTaskCreateDto input)
        {
            return _paramConfigTaskService.PostAsync(input);
        }
    }
}
